// This is where project configuration and plugin options are located.
// Learn more: https://gridsome.org/docs/config

// Changes here require a server restart.
// To restart press CTRL + C in terminal and run `gridsome develop`

module.exports = {
  siteName: 'Gridsome',
  plugins: [
    {
      use: '@gridsome/source-filesystem',
      options: {
        typeName: 'mdPost',
        path: './content/blog/**/*.md',
      }
    },

    // {
    //   use: '@gridsome/source-filesystem',
    //   options: {
    //     path: 'blog/**/*.md',
    //     typeName: 'Post',
    //     remark: {
    //       // remark options
    //     }
    //   }
    // }
    {
      use: '@gridsome/source-strapi',
      options: {
        apiURL: 'http://localhost:1339/api',
        queryLimit: 1000, // Defaults to 100
        // contentTypes: ['tabs'], // 
        // singleTypes: ['settings'],
        // Possibility to login with a Strapi user,
        // when content types are not publicly available (optional).
        // loginData: { // 配置有访问权限的接口
        //   identifier: '',
        //   password: ''
        // }
      }
    },
  ],
  transformers: {
    remark: {
      plugins: ['remark-attr']
        // global remark options
      }
  },
  templates: {
    // post: [
    //   {
    //     path: '/post/1',
    //     component: './src/templates/Post.vue'
    //   }
    // ]
  }
}
